#pragma once

#include<iostream>
#include<unistd.h>
#include<fcntl.h>

class Util
{
public:
    static bool SetNonBlock(int fd)
    {
        int fl = fcntl(fd,F_GETFL);
        if(fl<0) return false;
        fcntl(fd,F_GETFL,fl | O_NONBLOCK);
        return true;
    }
};
